﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;
using System.Data;
namespace BUS
{
    public class Thuoc_BUS
    {
        public static DataTable DanhSachThuoc()
        {
            return Thuoc_DAO.DanhSachThuoc();
        }
        public static DataTable DanhSachThuocTheoTen(string TenThuoc)
        {
            return Thuoc_DAO.DanhSachThuocTheoTen(TenThuoc);
        }
        public static Boolean ThemThuoc(Thuoc_DTO thuoc_DTO)
        {
            try
            {
                return Thuoc_DAO.ThemThuoc(thuoc_DTO);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public static Boolean XoaThuoc(string Ma)
        {
            return Thuoc_DAO.XoaThuoc(Ma);
        }

        public static Boolean CapNhatThuoc(Thuoc_DTO thuoc_DTO)
        {
            return Thuoc_DAO.CapNhatThuoc(thuoc_DTO);
        }

        public static int KiemTraThuocTonTaiOut(string tenthuoc)
        {
            try
            {
                return Thuoc_DAO.KiemTraThuocTonTaiOut(tenthuoc);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
